<script setup>
//获取轮播图,使用命名导出时，在导入时需要使用{}来接收
import { ref,onMounted } from 'vue'
const bannerList = ref([{
            "id": 1001,
            "imgUrl": "https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/popular_1.jpg"
        },
        {
            "id": 1002,
            "imgUrl": "https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/popular_2.jpg"
        },
        {
            "id": 1003,
            "imgUrl": "https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/popular_3.jpg"
        },
        {
            "id": 1004,
            "imgUrl": "https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/popular_4.jpg"
        }])
</script>



<template>
  <div class="home-banner">
   <div class="left-lunbo">
    <el-carousel height="500px" class="lunbo">
      <el-carousel-item v-for="item in bannerList" :key="item.id">
        <img :src="item.imgUrl" alt="">
      </el-carousel-item>
    </el-carousel>
  
   </div>
    <div class="right-info">
<div class="info-img">
<img src="../../../assets/images/avtor.jpg" alt="">
<p>hi，user</p>
</div>
<div class="info-center">
<img src="../../../assets/images/right-info.png" alt="">
</div>
<div class="info-footer"> 
<div class="gonggao-title"><p><strong> <i class="iconfont icon-tongzhi"></i>公告：</strong>今天天气很不错，可以出去一起玩</p></div>
<div class="function">
  <div class="icon" >
    <i class="iconfont icon-shoucang" ></i>
    <div class="icon-name">我的收藏</div>
  </div>
  <div class="icon" >
    <i class="iconfont icon-dizhi"></i>
    <div class="icon-name">我的地址</div>
  </div>
  <div class="icon"  @click="$router.push(
          '/cartlist'
        )" >
    <i class="iconfont icon-gouwuche"></i>
    <div class="icon-name" >我的购物车</div>
  </div>
  <div class="icon" >
    <i class="iconfont icon-dingdan"></i>
    <div class="icon-name">我的订单</div>
  </div>
</div>
</div>
    </div>
  </div>
</template>



<style scoped lang='scss'>
.home-banner {
  width: 1024px;
  height: 500px;
  display: flex;
.left-lunbo{
  // display: flex;
  height: 100%;
  .lunbo{
    border-radius: 2%;
    width: 724px;
    height: 100%;
    img {
    width: 100%;
    height: 100%;
  }
  }
  .down{
    display: flex;
    margin-top: 5px;
    .down-lunbo{
      width: 360px;
      height: 230px;
      border-radius: 5%;
      margin-left: 4px;
      img {
        width: 100%;
        height: 100%;
      }

  }
}
}
  .right-info{
    width: 248px;
    background: rgba(255, 80, 55, 0.8);
    height: 500px;
    float: right;
    border-radius: 2%;
    margin-left: 2px;
    .info-img{
      width: 100%;
      height: 150px;
      
img{
  height: 70px;
  width: 70px;
  border-radius: 50%;
  margin-top: 10%;
  margin-left: 36%;
}
p{
  margin-top: 4%;
  margin-left: 37%;
}
    }
    .info-center{
      width: 100%;
      height: 150px;
img{
  width: 100%;
  height: 100%;
}
    }
    .info-footer{
      width: 100%;
      height: 200px;
      .gonggao-title{
        width: 100%;
        height: 30px;
        margin-top: 10%;
        p{
          margin-left: 10px;
          line-height: 30px;
          font-size: 12px;
        }
      }
      .function{
        width: 100%;
        display: flex;
        .icon{
          margin-top: 15% ;
          margin-left: 3%;
          width: 25%;
          cursor: po;
          i{
            margin-left: 15%;
            font-size: large;
          }
          .icon-name{
              font-size: 10px;
              width: 100%;
          }
        }
      }
    }
  }
}
</style>